#pragma once

#include "Property/EditorPropertyModel.h"
#include "Pages/EditorPageModel.h"
#include "EditorNodeScalePropertyModel.m.h"

class RSceneNode;


RCLASS()
class REditorNodeScalePropertyOperation : public REditorPageOperation
{
    ROBJECT

public:
    enum class EAxis
    {
        X,
        Y,
        Z
    };

    void ChangeValue(
        TSharedObjectPtr<RSceneNode> InNode,
        EAxis InAxis,
        float InOldValue,
        float InValue
    );

protected:

    TSharedObjectPtr<RSceneNode> Node;
    EAxis Axis;
    float OldValue;
    float NewValue;

};



RCLASS(ExtraHeader="Scene/SceneNode.h")
class REditorNodeScalePropertyModel : public REditorPropertyModel
{
    ROBJECT

public:

    static TSharedObjectPtr<REditorNodeScalePropertyModel> Create(
        TSharedObjectPtr<RSceneNode> InNode,
        RObject* InParent
        );

    RFIELD()
    TSharedObjectPtr<RSceneNode> Node;

    float GetX() const;
    void SetX(float InX);

    float GetY() const;
    void SetY(float InY);

    float GetZ() const;
    void SetZ(float InZ);

};